package com.park.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.park.dao.SupplementaryRecordMapper;
import com.park.model.Arrears;
import com.park.model.SupplementaryRecord;
import com.park.service.SupplementaryRecordService;

@Service
public class SupplementaryRecordServiceImp implements SupplementaryRecordService {
	@Autowired
	private SupplementaryRecordMapper supplementaryRecordMapper;
	@Override
	public int insert(SupplementaryRecord supplementaryRecord) {
		return supplementaryRecordMapper.insert(supplementaryRecord);
	}
	@Override
	public List<Map<String, Integer>> getByDateTime(String startDate, String endDate,List<Integer> parkIds) {
		return supplementaryRecordMapper.getByDateTime(startDate,endDate,parkIds);
	}
	@Override
	public List<SupplementaryRecord> select(int i, int pageSize, String plateNumber, String operatorId, String parkName,
			String portNumber, String exitDateStart, String exitDateEnd) {
		System.out.println(plateNumber+"\t"+operatorId+"\t"+exitDateStart+"\t"+exitDateEnd);
		return supplementaryRecordMapper.select(i, pageSize,plateNumber,operatorId,portNumber,parkName,exitDateStart,exitDateEnd);
	}
	@Override
	public int getCount(String plateNumber, String operatorId, String parkName, String portNumber, String exitDateStart,
			String exitDateEnd) {
		// TODO Auto-generated method stub
		return supplementaryRecordMapper.getCount(plateNumber,operatorId,portNumber,parkName,exitDateStart,exitDateEnd);
	}
	@Override
	public List<SupplementaryRecord> select(Arrears arrears) {
		// TODO Auto-generated method stub
		return supplementaryRecordMapper.select1(arrears);
	}
	@Override
	public int getCount(Arrears arrears) {
		// TODO Auto-generated method stub
		return supplementaryRecordMapper.getCount1(arrears);
	}
	@Override
	public int getAllSupplementary() {
		// TODO Auto-generated method stub
		return supplementaryRecordMapper.getAllSupplementary();
	}
	@Override
	public int getOfDay(List<Long> ids) {
		// TODO Auto-generated method stub
		return supplementaryRecordMapper.getOfDay(ids);
	}

}
